<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php include_http_metas() ?>
<?php include_metas() ?>

<?php include_title() ?>

<?php include('scripts.php'); ?>
<link rel="shortcut icon" href="/favicon.ico"/>
<?php
$c = new Criteria();
$c->add(AppSettingPeer::PARAMETER, Globals::SETTING_BACKGROUND_IMAGE);
$appSetting = AppSettingPeer::doSelectOne($c);
?>
<style type="text/css">
body {
<?php
$c = new Criteria();
$c->add(AppSettingPeer::PARAMETER, Globals::SETTING_BACKGROUND_IMAGE);
$appSetting = AppSettingPeer::doSelectOne($c);
$image = "/images/main-bg.jpg";
if ($appSetting) {
    $image = $appSetting->getValue();
}
?>
    background:url(<?php echo $image; ?>) top center no-repeat;
}
</style>
</head>

<body>
<script>
$(function() {
    $("button, input:submit, input:button").button();
})
</script>

<div class="main-width">
    <div id="header">
        <div class="top">
            <div class="logo">
                <!-- ========== LOGO ========== -->
                <a href="/"><img
                        src="/images/logo.png" alt="" height="70"></a>
                <!-- ========================== -->
            </div>

            <div class="alignright">
                <div class="nav-links">
                    <!-- ========== NAVIGATION LINKS ========== -->
                    <a href="/home"><?php echo __('Home') ?></a>
                    <?php if ($sf_user->isAuthenticated()) { ?>
                    &nbsp; | &nbsp;
                    <a href="/member/logout"><?php echo __('Log Out') ?></a>
                    &nbsp; | &nbsp;
                    <a href="/member/myAccount"><?php echo __('My Account') ?></a>
                    <?php } else { ?>
                    &nbsp; | &nbsp;
                    <a href="/member/login"><?php echo __('Log In') ?></a>
                    <?php } ?>
                    <!-- ====================================== -->
                </div>
                <div class="lang">
                    <!-- ========== LANGUAGES ========== -->
                    <a href="<?php echo url_for("/home/language?lang=en") ?>" style="text-decoration: none; color: #ffffff;">
                        English</a>
                    | <a href="<?php echo url_for("/home/language?lang=cn") ?>" style="text-decoration: none; color: #ffffff;">
                        中文</a>
                    <!-- =============================== -->
                </div>
            </div>
        </div>
        <div class="row">
            <!-- ========== MENU ========== -->
            <div class="menu">
                <div id="navEZPagesTop">
                    <ul>
                        <?php
                        $c = new Criteria();
                        $c->add(CmsMenuPeer::STATUS_CODE, Globals::STATUS_ACTIVE);
                        $c->addAscendingOrderByColumn(CmsMenuPeer::SEQ);
                        $menus = CmsMenuPeer::doSelect($c);

                        foreach ($menus as $menu) {
                            if ($sf_user->getCulture()=="cn")
                                echo "<li class='li_un'><a href='".url_for($menu->getMenuUrl())."'>".$menu->getMenuNameCn()."</a></li>";
                            else
                                echo "<li class='li_un'><a href='".url_for($menu->getMenuUrl())."'>".$menu->getMenuName()."</a></li>";
                        }
                        ?>
                    </ul>
                </div>
            </div>
            <!-- ========================== -->
            <div class="cart">
                <div class="cart-bg">
                    <!-- ========== SHOPPING CART ========== -->
                    <a href="/shoppingcart"> Shopping Cart</a>
                    <br>now in your cart
                    <strong><a href="/shoppingcart"><?php echo $sf_user->getAttribute(Globals::SESSION_CART_TOTAL_ITEM, 0) ?> items</a></strong>
                    <!-- =================================== -->
                </div>
            </div>
        </div>

        <div class="search ">
            <!-- ========== SEARCH ========== -->
            <form method="get" action="/product/search" name="productForm">
                <div>
                    <input type="text" onfocus="if(this.value =='Search' ) this.value=''"
                           onblur="if(this.value=='') this.value='Search'" class="input1" value="Search" name="keyword">
                    <input type="image" title=" Search " alt="Search" src="/images/buttons/search.gif">
                </div>
            </form>
            <!-- ============================ -->
        </div>
        <!-- BOF- BANNER #2 display -->
        <!-- EOF- BANNER #2 display -->
    </div>

    <?php echo $sf_data->getRaw('sf_content') ?>

    <!-- ========== FOOTER ========== -->
    <div id="footer">
        <!-- BOF- BANNER #5 display -->
        <!-- EOF- BANNER #5 display -->
        <div class="wrapper">
            <div class="cards">
                <!-- ========== CARDS ========== -->
                <img src="/images/misc/paypal.gif" alt="" height="25" width="146"> <!-- =========================== -->
            </div>
            <div class="menu">
                <!-- ========== MENU ========== -->
                <?php
                foreach ($menus as $menu) {
                    if ($sf_user->getCulture()=="cn")
                        echo "<a href='".url_for($menu->getMenuUrl())."'>".$menu->getMenuNameCn()."</a>&nbsp;&nbsp;//&nbsp;&nbsp;";
                    else
                        echo "<a href='".url_for($menu->getMenuUrl())."'>".$menu->getMenuName()."</a>&nbsp;&nbsp;//&nbsp;&nbsp;";
                }
                ?>
                <!-- ========================== -->
            </div>
            <p>
                <!-- ========== COPYRIGHT ========== -->
                Copyright © 2011 <a
                    href="http://www.walao.com.my"
                    target="_self">walao.com.my</a>. Powered by <a href="#" target="_self">r9jason studio</a>
                <!-- =============================== -->
            </p>
        </div>
    </div>
</div>

</body>
</html>
